package wjw.mapper;

import com.wjw.mapper.EvaluateIndexTableMapper;
import com.wjw.model.Evaluate_index_table;
import com.wjw.utils.GetSqlSessionUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

public class EvaluateIndexTable {

    private SqlSession sqlsession= GetSqlSessionUtils.getSqlSession();
    private EvaluateIndexTableMapper mapper=sqlsession.getMapper(EvaluateIndexTableMapper.class);


    @Test
    public void test01(){
        List<Evaluate_index_table> all = mapper.findAll();
        System.out.println(all);
    }

    @Test
    public void test02(){
        Evaluate_index_table evaluate_index_table = new Evaluate_index_table();
        evaluate_index_table.setEvaluate_index_name("afa");
        mapper.add(evaluate_index_table);
        sqlsession.commit();
    }

    @Test
    public void test03(){
        Evaluate_index_table evaluate_index_table = new Evaluate_index_table();
        evaluate_index_table.setEvaluate_index_name("af");
        evaluate_index_table.setEvaluate_index_id(4);
        mapper.change(evaluate_index_table);
        sqlsession.commit();
    }
}
